/**
 *  @file SDLLevelTitle.cpp
 *
 *  @date 8-dec-2009
 *  @author Ives van der Flaas
 */

#include <tr1/memory>
#include "SDLLevelTitle.h"
#include "SDLZoomDrawer.h"
#include "SDLTextRepresentation.h"


si_sdl::SDLLevelTitle::SDLLevelTitle(std::string title):
	LevelTitle(title)
{

	fRepresentation =  std::tr1::shared_ptr<si::Representation>(
							new SDLTextRepresentation(
									title,
									"fonts/Vera.ttf",
									30,
									Color(250,250,250),
									transparant,
									ALIGN_LEFT));
}


void si_sdl::SDLLevelTitle::draw() const
{
	// center the title
	fRepresentation->draw(
			si::Vector2(SDLZoomDrawer::get()->requestDrawableRegion()/2-fRepresentation->getSize()/2),
			si::Vector2(0,0));
}



